Arrays

There are 2 arrays defined in iziBasic: A() and A$().
At runtime, both can address all Numbers and text Strings stacks.

A-Z variables are also addressed with A(1)-A(26)
A$-Z$ variables are also addressed with A$(1)-A$(26)
This means, for instance, that A$(2) and B$ are the same thing, A(4) and D are also the same.

DIM A(n)
DIM A$(n)

At design time, DIM A[$](n) reserves some space in the Numbers/Text stack in addition to the A-Z/A$-Z$ variables

Notes:


CONST A(n)=n

Define A(n) as a numerical constant.

CONST A$(n)=t

Define A$(n) as a text string constant.

Notes:


[LET] A(v|n)=v|n|f [MathOper v|n|f] [...]
[LET] A$(v|n)=c|t|s [+ c|t|s] [...]

LET assigns the value of the expression after the "=" sign to the variable. iziBasic supports implied LET statements, meaning that the LET statement is optional.

Notes:


MAX A(v|n1, v|n2)

Returns the highest value of array between the v|n1 index and the v|n2 one


MEAN A(v|n1, v|n2)

Returns the average value of array between the v|n1 index and the v|n2 one


MIN A(v|n1, v|n2)

Returns the smallest value of array between the v|n1 index and the v|n2 one


RSORT A, v|n1, v|n2

Reverse sorts array by values from the v|n1 index to the v|n2 one.

RSORT A$, v|n1, v|n2

Alphabetical reverse sort of array from the v|n1 index to the v|n2 one. The sort is case sensitive


SORT A, v|n1, v|n2

Sorts array by values from the v|n1 index to the v|n2 one.

SORT A$, v|n1, v|n2

Alphabetical sort of array from the v|n1 index to the v|n2 one. The sort is case sensitive


SUM A(v|n1, v|n2)

Returns the sum of all values of array between the v|n1 index and the v|n2 one